package com.bestcem.xm.qdes.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bestcem.xm.common.core.domain.web.XmResultJson;
import com.bestcem.xm.component.mybatis.service.IXmService;
import com.bestcem.xm.qdes.controller.param.ExportQuotaParam;
import com.bestcem.xm.qdes.controller.param.QuotaCreateParam;
import com.bestcem.xm.qdes.controller.param.QuotaDeleteParam;
import com.bestcem.xm.qdes.controller.param.QuotaNameModifyParam;
import com.bestcem.xm.qdes.controller.vo.*;
import com.bestcem.xm.qdes.entity.QdesQuota;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;


/**
 * 描述：配额
 * 作者：杨海奇
 * 时间：2022/8/25 17:34
 */
public interface QdesQuotaService extends IXmService<QdesQuota> {

    /**
     * 分页配额查询
     *
     * @param page
     * @param projectId
     * @return
     */
    QdesQuotaPageVo getQuotaList(Page<QdesQuota> page, String projectId);

    /**
     * @param quataId
     * @return
     */
    QdesQuotaVo getQuotaDetail(String quataId);

    /**
     * @param projectId
     * @param quotaId
     * @return
     */
    QuotaNameVo getQuotaName(String projectId, String quotaId);

    /**
     * @param projectId
     * @param quotaId
     * @param param
     * @return
     */
    QuotaIdVo setQuotaName(String projectId, String quotaId, QuotaNameModifyParam param);

    /**
     * @param projectId
     * @param quotaDeleteParam
     * @return
     */
    DeletedCountVo deleteQuotas(String projectId, QuotaDeleteParam quotaDeleteParam);

    /**
     * @param projectId
     * @param quotaCreateParam
     * @return
     */
    QuotaIdVo createQuota(String projectId, QuotaCreateParam quotaCreateParam);

    /**
     * @param projectId        projectId
     * @param exportQuotaParam exportQuotaParam
     * @param response         response
     */
    void exportQuota(String projectId, ExportQuotaParam exportQuotaParam, HttpServletResponse response);

    /**
     * @param projectId projectId
     * @param files     files
     */
    XmResultJson<Object> importQuota(String projectId, MultipartFile files);
}
